﻿using LPLS.Commons.DBModule;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LPLS.DBEntities.LongGIModule
{

    [DatabaseKey(DatabaseEnum.LongGiDB)]
    [SugarTable(nameof(KaJiangData))]
    public  class KaJiangData
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int ID { get; set; }

        [Description("步名称")]
        /// <summary>
        /// 步名称
        /// </summary>
        public string StepName { get; set; }

        /// <summary>
        /// 0 空载 1负载
        /// </summary>
        public int TypeNumber { get; set; }
        [SugarColumn(IsIgnore =true)]
        [Description("空载或负载")]
        public string TypeNumberName
        {
            get
            {
                if (TypeNumber == 0)
                {
                    return "空载";
                }
                else if (TypeNumber == 1)
                {
                    return "负载";
                }
                else
                {
                    return "未知";
                }
            }
        }
        [Description("炉管名称")]
        /// <summary>
        /// 管道名称
        /// </summary>
        public string TubeName { get; set; }
        [Description("工艺名称")]
        /// <summary>
        /// 工艺名称
        /// </summary>
        public string TechnologyName { get; set; }
        [Description("时间")]
        /// <summary>
        /// 时间
        /// </summary>
        public DateTime Time { get; set; }
        [Description("漏率值")]
        /// <summary>
        /// 漏率值
        /// </summary>
        public float Value { get; set; }

        /// <summary>
        /// excel名称
        /// </summary>
        public string ExcelName { get; set; }

        /// <summary>
        /// 0 平均值  1 最大值
        /// </summary>
        public int TypeValue { get; set; }

        [SugarColumn(IsIgnore =true)]
        [Description("值类型")]
        public string TypeValueName
        {
            get
            {
                if (TypeValue == 0)
                {
                    return "平均值";
                }
                else if (TypeValue == 1)
                {
                    return "最大值";
                }
                else
                {
                    return "未知";
                }
            }
        }


    }
}
